package com.sunwayworld.basemodule.business.batchrevise.resource.impl;

import com.sunwayworld.basemodule.business.batchrevise.bean.LimsSampleTempBean;
import com.sunwayworld.basemodule.samplemanage.sample.bean.LimsSampleBean;
import com.sunwayworld.framework.data.page.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.sunwayworld.basemodule.business.batchrevise.resource.LimsBatchSampleTempResource;
import com.sunwayworld.basemodule.business.batchrevise.service.LimsBatchSampleTempService;
import com.sunwayworld.framework.spring.annotation.GikamBean;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogModule;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;

@LogModule("送检单样本临时表")
@RestController
@GikamBean
public class LimsBatchSampleTempResourceImpl implements LimsBatchSampleTempResource {

    @Autowired
    private LimsBatchSampleTempService limsBatchSampleTempService;

    @Override
    public LimsBatchSampleTempService getService() {
        return limsBatchSampleTempService;
    }

    @Log(value = "新增送检单样本临时表", type = LogType.INSERT)
    @Override
    @RequestMapping(method = RequestMethod.POST)
    public Long insert(RestJsonWrapperBean wrapper) {
        return getService().insert(wrapper);
    }

    @Override
    public void insertSample(RestJsonWrapperBean wrapper) {
        getService().insertSample(wrapper);
    }

    @Override
    public void updateSample(RestJsonWrapperBean wrapper) {
        getService().updateSample(wrapper);
    }

    @Override
    public Page<LimsSampleTempBean> selectBatchSampleInfo(RestJsonWrapperBean wrapper) {
        return getService().selectBatchSampleInfo(wrapper);
    }

    @Override
    public void deleteBatchSamples(RestJsonWrapperBean wrapper) {
        getService().deleteBatchSamples(wrapper);
    }
}
